package com.sg.controller.pbff;

import com.sg.service.biz.pbff.TimingTaskService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TimingTask", tags = {"TimingTask"})
@RestController
// @RequestMapping("/poms/timingTask/")
public class TimingTaskController {
    @Autowired
    TimingTaskService timingTaskService;

    /**
     * B3提交人工补偿异步调度任务(管理)(平台)
     * gen by moon at 12/22/2022, 12:27:27 AM
     */
    @PostMapping("/oms/platform/mgt/timingTask/commitHandRescueSlowTask")
    @ApiOperation(value = "B3提交人工补偿异步调度任务(管理)(平台)", response = OkrResult.class)
    public OkrResult<BffCommitHandRescueSlowTaskRespDto> commitHandRescueSlowTask(@RequestBody(required = false) @Validated BffCommitHandRescueSlowTaskReqDto reqDTO) {
        return OkrResult.success(timingTaskService.commitHandRescueSlowTask(reqDTO));
    }

    /**
     * B3执行启用空间长生调度MQ(管理)
     * gen by moon at 11/28/2022, 3:16:02 AM
     */
    @PostMapping("/oms/platform/mgt/timingTask/implementEnableSpaceEverYoungDispatchMq")
    @ApiOperation(value = "B3执行启用空间长生调度MQ(管理)", response = OkrResult.class)
    public OkrResult<BffImplementEnableSpaceEverYoungDispatchMqRespDto> implementEnableSpaceEverYoungDispatchMq(@RequestBody(required = false) @Validated BffImplementEnableSpaceEverYoungDispatchMqReqDto reqDTO) {
        return OkrResult.success(timingTaskService.implementEnableSpaceEverYoungDispatchMq(reqDTO));
    }

    /**
     * B3执行分析狗骨头剩余情况(管理)
     * gen by moon at 5/18/2023, 11:08:43 PM
     */
    @PostMapping("/oms/platform/mgt/timingTask/implementAnalyseDogBoneResidue")
    @ApiOperation(value = "B3执行分析狗骨头剩余情况(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAnalyseDogBoneResidueRespDto> implementAnalyseDogBoneResidue(@RequestBody(required = false) @Validated BffImplementAnalyseDogBoneResidueReqDto reqDTO) {
        return OkrResult.success(timingTaskService.implementAnalyseDogBoneResidue(reqDTO));
    }

}

